/*package org.domain.pseample.session;

import org.ajax4jsf.event.PushEventListener;
import java.util.EventObject;
import java.util.EventListener;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.In;
import org.jboss.seam.security.Credentials;
import org.ajax4jsf.component.html.HtmlAjaxCommandButton;


@Name("pushServerMessage")
@Scope(ScopeType.STATELESS)
public class PushServerMessage {
	@In
	Credentials credentials;
	
	private HtmlAjaxCommandButton acceptCallButton;
	private PushEventListener listener;

	public void addListener(EventListener eventListener) {
			this.listener = (PushEventListener) eventListener;
	}

	public void push(String caller) {
		MapInstanceManager.instance().getMapInstance(credentials.getUsername())
				.setStatusMessage(caller + " calling...");
		acceptCallButton.setDisabled(false);
		
		new Thread() {
			public void run() {
				listener.onEvent(new EventObject(this));
			}
		}.start();

	}

}
*/